<?php
/**
 * To hold attachments of a request
 * 
 * PHP version 5
 * 
 * @category  Framework
 * @package   Abacus11_Framework
 * @author    Philippe Jausions <jausions@php.net>
 * @copyright 2008 11abacus / Philippe Jausions
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD
 * @link      http://pear.11abacus.com/package/Abacus11_Framework
 */

/**
 * Required dependencies
 */
require_once 'PHP/ArrayOf.php';
require_once 'Abacus11/Framework/Request/Attachment.php';

/**
 * To hold attachments of a request
 * 
 * PHP version 5
 * 
 * @category  Framework
 * @package   Abacus11_Framework
 * @author    Philippe Jausions <jausions@php.net>
 * @copyright 2008 11abacus / Philippe Jausions
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD
 * @link      http://pear.11abacus.com/package/Abacus11_Framework
 */
class Abacus11_Framework_Request_Attachments extends PHP_ArrayOf
{
    /**
     * Checks only attachment instances are added
     *
     * @param mixed $value  value to check
     * @param mixed $offset offset the value would be stored at
     *
     * @return boolean TRUE if valid, FALSE otherwise
     * @access protected
     */
    public function isValidElement($value, $offset = null)
    {
        return ($value instanceof Abacus11_Framework_Request_Attachment);
    }
}

?>